function [X_norm Y_norm mu span surplusCols] = featureNormalize(X, Y)
	mu = mean(X);
	span = max(X).-min(X);
	X_norm = (X.-repmat(mu,size(X,1),1))./repmat(span,size(X,1),1);
	Y_norm = (Y.-repmat(mu,size(Y,1),1))./repmat(span,size(Y,1),1);
	surplusCols=span==0;
	X_norm(:,surplusCols)=[];
	Y_norm(:,surplusCols)=[];
end
